<template>
  <div class='row'>
    <h2 class=" text-center">
      检测报告
    </h2>
    <div id="queryinput" class="container-fluid">
      <div class="row-fluid">
        <div class="col-sm-12 ">
          <h4 class="page-header">
            基本信息
          </h4>
        </div>
      </div>
      <div class="row-fluid">
        <div class="span6">
          <form class="form-horizontal contract-form">
            <div class="form-group">
              <label class="col-sm-3 control-label">姓名</label>
              <div class="col-sm-2">
                <input id="username" name="name" type="text" class="form-control contact-name-input" v-model="username"/>
              </div>
              <label class="col-sm-2 control-label">编号</label>
              <div class="col-sm-2">
                <input id="mem_id" name="id" type="text" class="form-control contact-name-input" v-model="item.id"
                       readonly/>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">出生日期</label>
              <div class="col-sm-2">
                <input type="text" id="birthday" name="birthday" class="form-control contact-name-input"/>
              </div>
              <label class="col-sm-2 control-label">性别</label>
              <div class="col-sm-2">
                <input type="radio" id="sex" name="sex" value="man" v-model="picked">
                <label for="sex">男</label>
                &nbsp; &nbsp; &nbsp;
                <input type="radio" id="sex2" name="sex" value="woman" v-model="picked">
                <label for="sex2">女</label>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">住址</label>
              <div class="col-sm-6">
                <input type="text" id="address" name="address"
                       class="form-control contact-name-input"/>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">邮编</label>
              <div class="col-sm-2">
                <input type="text" id="postcode" name="postcode"
                       class="form-control contact-name-input"/>
              </div>
              <label class="col-sm-2 control-label">联系电话</label>
              <div class="col-sm-2">
                <input type="text" id="phone" name="phone"
                       class="form-control contact-name-input"/>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">电子邮箱</label>
              <div class="col-sm-2">
                <input type="text" id="mail" name="mail"
                       class="form-control contact-name-input"/>
              </div>
              <label class="col-sm-2 control-label">BMI</label>
              <div class="col-sm-2">
                <input type="text" id="bmi" name="bmi" class="form-control contact-name-input"/>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">体重(Kg)</label>
              <div class="col-sm-1">
                <input type="text" id="weight" name="weight"
                       class="form-control contact-name-input"/>
              </div>
              <label class="col-sm-3 control-label">身高(cm)</label>
              <div class="col-sm-1">
                <input type="text" id="heigh" name="heigh" class="form-control contact-name-input"/>
              </div>
            </div>
            <div class="row-fluid">
              <div class="col-sm-12">
                <h4 class="page-header">
                  记录信息
                </h4>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">记录开始时间</label>
              <div class="col-sm-1">
                <input type="text" id="begtime" name="begtime"
                       class="form-control contact-name-input"/>
              </div>
              <label class="col-sm-3 control-label">持续时间</label>
              <div class="col-sm-1">
                <input type="text" id="during" name="during" class="form-control contact-name-input"/>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">记录结束时间</label>
              <div class="col-sm-1">
                <input type="text" id="endtime" name="endtime"
                       class="form-control contact-name-input"/>
              </div>
            </div>
            <div class="row-fluid">
              <div class="col-sm-12">
                <h4 class="page-header">
                  呼吸总览
                </h4>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">呼吸暂停及低通气指数(AHI)</label>
              <div class="col-sm-1">
                {{ahi}}
              </div>
              <label class="col-sm-2 control-label"> 鼾声指数(Snore Index)</label>
              <div class="col-sm-1">
                {{snoreindex}}
              </div>
              <label class="col-sm-2 control-label">氧减指数(ODI)</label>
              <div class="col-sm-1">
                {{odi}}
              </div>
            </div>

            <div class="row-fluid">
              <div class="col-sm-12">
                <h4 class="page-header">
                  睡眠总量
                </h4>
              </div>
            </div>

            <div class="form-group">
              <label class="col-sm-3 control-label">睡眠开始时刻</label>
              <div class="col-sm-2">
                <input type="text" id="begtime_sleep" name="begtime"
                       class="form-control contact-name-input"/>
              </div>
            </div>

            <div class="form-group">
              <label class="col-sm-3 control-label">睡眠结束时刻</label>
              <div class="col-sm-2">
                <input type="text" id="endtime_sleep" name="begtime"
                       class="form-control contact-name-input"/>
              </div>
            </div>

            <div class="form-group">
              <label class="col-sm-3 control-label">睡眠开始时刻</label>
              <div class="col-sm-2">
                <input type="text" id="during_sleep" name="begtime"
                       class="form-control contact-name-input"/>
              </div>
            </div>

            <div class="row-fluid">
              <div class="col-sm-12">
                <h4 class="page-header">
                  数据记录
                </h4>
              </div>
            </div>

            <div class="row-fluid">
              <div class="col-sm-12">
                <h4 class="page-header">
                  统计指标
                </h4>
              </div>
            </div>
            <hr/>

            <div class="form-group">
              <div class="col-sm-offset-6 col-sm-2">
                <button id='submitbutton' class="btn btn-block btn-success save" v-on="click:execute(item)">存储报告</button>
              </div>
              <div class="col-sm-2">
                <button class="btn btn-block btn-warning" v-on="click:cancel(item)">取消</button>
              </div>
            </div>

          </form>
        </div>
      </div>
    </div>
  </div>
</template>
